Optimal. Leaf size=54 \[ \frac {a (A-i B)}{c f (\tan (e+f x)+i)}+\frac {a B \log (\cos (e+f x))}{c f}+\frac {i a B x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac {a (A-i B)}{c f (\tan (e+f x)+i)}+\frac {a B \log (\cos (e+f x))}{c f}+\frac {i a B x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3588
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{c-i c \tan (e+f x)} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{(c-i c x)^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (\frac {-A+i B}{c^2 (i+x)^2}-\frac {B}{c^2 (i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {i a B x}{c}+\frac {a B \log (\cos (e+f x))}{c f}+\frac {a (A-i B)}{c f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.94, size = 123, normalized size = 2.28 \[ \frac {a (\sin (e+f x)-i \cos (e+f x)) \left (\cos (e+f x) \left (A+i B \log \left (\cos ^2(e+f x)\right )-4 B f x-i B\right )+\sin (e+f x) \left (i A+B \log \left (\cos ^2(e+f x)\right )+4 i B f x+B\right )+2 B \tan ^{-1}(\tan (2 e+f x)) (\cos (e+f x)-i \sin (e+f x))\right )}{2 c f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.20, size = 43, normalized size = 0.80 \[ \frac {{\left (-i \, A - B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )} + 2 \, B a \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{2 \, c f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.91, size = 130, normalized size = 2.41 \[ \frac {\frac {B a \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c} - \frac {2 \, B a \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c} + \frac {B a \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c} + \frac {3 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 8 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 3 \, B a}{c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{2}}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 64, normalized size = 1.19 \[ -\frac {i a B}{f c \left (\tan \left (f x +e \right )+i\right )}+\frac {a A}{f c \left (\tan \left (f x +e \right )+i\right )}-\frac {a B \ln \left (\tan \left (f x +e \right )+i\right )}{f c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.57, size = 51, normalized size = 0.94 \[ \frac {\frac {A\,a}{c}-\frac {B\,a\,1{}\mathrm {i}}{c}}{f\,\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}-\frac {B\,a\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}{c\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.38, size = 92, normalized size = 1.70 \[ \frac {B a \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c f} + \begin {cases} - \frac {\left (i A a e^{2 i e} + B a e^{2 i e}\right ) e^{2 i f x}}{2 c f} & \text {for}\: 2 c f \neq 0 \\- \frac {x \left (- A a e^{2 i e} + i B a e^{2 i e}\right )}{c} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________